#include "stdafx.h"
#include "TestHandle.h"


CLASS_IMPLEMENT_EX (CDataInterface, TestHandle)


TestHandle::TestHandle(void)
{
}

TestHandle::~TestHandle(void)
{
}

static AmfObjectPtr pOutData;
AmfObjectPtr WINAPI TestHandle::Test1( LPCWSTR p1, int32 p2, float32 p3 )
{
	//if (NULL == pOutData)
	//{
	//	Amf3XML xml;
	//	pOutData = xml.readObject("out_data.xml");
	//}

	AmfArrayPtr parr(HP_NEW) ;
	parr->AddData(p1);
	parr->AddData(p2);
	parr->AddData(p3);
	parr->AddData(pOutData);

	static int tt = 0;
	if ((tt++ % 100) == 0)
		cout << "Test2 " << tt << "\n";

	return parr;
}

AmfObjectPtr WINAPI TestHandle::Test2( LPCWSTR p1, int32 p2, AmfDatePtr p3 )
{
	AmfArrayPtr parr(HP_NEW) ;
	parr->AddData(p1);
	parr->AddData(p2);
	parr->AddData(p3);

	static int tt = 0;
	if ((tt++ % 100) == 0)
		cout << "Test2 " << tt << "\n";
	return parr;
}